package spring.boot.admin.handler;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class RedisTwoChannelOneHandler extends MessageListenerAdapter {

    private static final String REDIS_TWO_CHANNEL_ONE = "REDIS_TWO_CHANNEL_ONE";

    /**
     * 接收消息
     */
    public void handleMessage(String message) {
        log.info("redis数据源two的第一个消息队列：REDIS_TWO_CHANNEL_ONE = {}", message);
    }


    public String getChannel() {
        return REDIS_TWO_CHANNEL_ONE;
    }
}
